﻿<phone:PhoneApplicationPage
    x:Class="NFCfyMe.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True">



    <phone:PhoneApplicationPage.Resources>
        
        <DataTemplate x:Key="bluetoothDeviceDisplayTemplateBig">
            <TextBlock Text="{Binding Name}" FontWeight="Bold" Style="{StaticResource PhoneTextTitle1Style}" />
        </DataTemplate>
        
        <DataTemplate x:Key="noHeaderTemplate">
            <TextBlock Height="0" />
        </DataTemplate>

    </phone:PhoneApplicationPage.Resources>




    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent" Margin="12,0,12,12" >
        
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>  <!--Titulo-->
            <RowDefinition Height="Auto"/>  <!--Seleccion de dispositivo bluetooth-->
            <RowDefinition Height="*"/>     <!--Botones de transmision-->
            <RowDefinition Height="Auto"/>  
            <RowDefinition Height="Auto"/> 
            
        </Grid.RowDefinitions>

        <StackPanel x:Name="TitlePanel" Grid.Row="0"  Height="Auto">
            <TextBlock 
                Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}" 
                Style="{StaticResource PhoneTextNormalStyle}"
            />
            <TextBlock 
                Text="{Binding Path=LocalizedResources.guia, Source={StaticResource LocalizedStrings}}" 
                Style="{StaticResource PhoneTextTitle1Style}"
            />
        </StackPanel>

        <StackPanel x:Name="ContentPanel" Grid.Row="1"  Height="Auto">
            <Button x:Name="findDevicesButton"  Content="{Binding Path=LocalizedResources.findDevices, Source={StaticResource LocalizedStrings}}"  HorizontalAlignment="Center" Height="Auto" Tap="findDevicesButton_Tap" />
            <ProgressBar x:Name="findDevicesProgressBar" />
            <TextBlock Text="{Binding Path=LocalizedResources.selectBluetoothDevice, Source={StaticResource LocalizedStrings}}" TextWrapping="Wrap"  />
            <toolkit:ListPicker 
                HeaderTemplate="{StaticResource  noHeaderTemplate }"
                x:Name="myListPicker" 
                FullModeHeader="selecciona dispositivo bluetooth"
                ItemsSource="{Binding}"               
                SelectionChanged="myListPicker_SelectionChanged_1"
                FullModeItemTemplate="{StaticResource bluetoothDeviceDisplayTemplateBig}"
            />
            <TextBlock Text="{Binding Path=LocalizedResources.orIntroduceName, Source={StaticResource LocalizedStrings}}" Margin="12,0,0,0" />
            <TextBox x:Name="nameInputbox" Grid.Column="0"  >
                
            </TextBox>
            <TextBlock Text="{Binding Path=LocalizedResources.introduceMAC, Source={StaticResource LocalizedStrings}}" />
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>

                <TextBox x:Name="macInputBox1" Grid.Column="0"  >
                    
                </TextBox>
                <TextBlock Text="" Grid.Column="1" />
                <TextBox x:Name="macInputBox2" Grid.Column="2" >
                    
                </TextBox>
                <TextBlock Text="" Grid.Column="3" />
                <TextBox x:Name="macInputBox3" Grid.Column="4" >
                    
                </TextBox>
                <TextBlock Text="" Grid.Column="5" />
                <TextBox x:Name="macInputBox4" Grid.Column="6" >
                    
                </TextBox>
                <TextBlock Text="" Grid.Column="7" />
                <TextBox x:Name="macInputBox5" Grid.Column="8" >
                    
                </TextBox>
                <TextBlock Text="" Grid.Column="9" />
                <TextBox x:Name="macInputBox6" Grid.Column="10" >
                    
                </TextBox>
            </Grid>
        </StackPanel>

        <Grid x:Name="buttonsPanel" Grid.Row="2"  >
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
                
            </StackPanel>
            <Button x:Name="transmissionButton" Grid.Row="1" Content="{Binding Path=LocalizedResources.startTransmission, Source={StaticResource LocalizedStrings}}"  HorizontalAlignment="Center" Tap="startTransmission"/>
            <ProgressBar x:Name="transmissionProgressBar" Grid.Row="2" />
            <StackPanel Grid.Row="3"/>
        </Grid>

        
        
        <TextBlock x:Name="logLine1" Grid.Row="3">
        </TextBlock >
        <TextBlock x:Name="logLine2" Grid.Row="4">
        </TextBlock >
            <!--Uncomment to see an alignment grid to help ensure your controls are
            aligned on common boundaries.  The image has a top margin of -32px to
            account for the System Tray. Set this to 0 (or remove the margin altogether)
            if the System Tray is hidden.

            Before shipping remove this XAML and the image itself.-->
        <!--<Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Margin="0,-32,0,0" Grid.Row="0" Grid.RowSpan="2" IsHitTestVisible="False" />-->
    </Grid>

</phone:PhoneApplicationPage>